package com.zxl.feign;

import com.zxl.feign.impl.UserFeignImpl;
import com.zxl.vo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(
        value = "user",
        path = "/user",
        fallback = UserFeignImpl.class
)
public interface UserFeign {
    @PostMapping("/add")
    boolean add(@RequestBody User user);

    @GetMapping("/list")
    List<User> getUser();

    @PostMapping("/delete")
    boolean delete(@RequestParam("ids") Integer[] ids);

    @GetMapping("/getById")
    User getById(@RequestParam("id") Integer id);

    @PostMapping("/edit")
    Boolean edit(@RequestBody User user);

    @PostMapping("/findBySome")
    List<User> findBySome(@RequestBody User user);



}
